package com.hxd.otc.module.fiat_deal.presenter;

import com.hxd.otc.base.BaseRecyclerPresenter;
import com.hxd.otc.module.fiat_deal.adapter.SelectFiatAdapter;
import com.hxd.otc.module.fiat_deal.bean.SelectFiatBean;
import com.hxd.otc.module.fiat_deal.contract.SelectFiatContract;

import java.util.ArrayList;
import java.util.List;


/**
 * Created by lzy on 2018/9/17 0017.
 * description ${选择法币Presenter}
 */
public class SelectFiatPresenter extends BaseRecyclerPresenter<SelectFiatContract.IView, SelectFiatAdapter, SelectFiatBean> implements SelectFiatContract.IPresenter {

    private ArrayList<String> fialts;
    public SelectFiatPresenter(SelectFiatContract.IView iView, ArrayList<String> fialts) {
        super(iView);
        this.fialts = fialts;
    }

    @Override
    public void loadData(boolean isRefresh) {
        ArrayList<SelectFiatBean> list = new ArrayList<>();
        for (int i = 0; i <fialts.size() ; i++) {
            list.add(new SelectFiatBean(fialts.get(i)));
        }
        onLoadDataSuccess(isRefresh, list);
    }

}
